smtpsrvr remotehost localhost channels
rsmtpsrvr remotehost localhost channels (finicky)
The smtpd program comes in several flavors depending on your operating system. In some cases, the burden of limiting and waiting for inbound connections is borne by a standard "daemon of daemons". In other cases, smtpd performs these operations. In any case, smtpd is the link between the network connection and the smtpsrvr program.
In the synopsis above, the first two versions of smtpd are standalone network daemons that accept incoming connections and fork off copies of the smptsrvr to process them. The last two versions are called by the standard ``daemon of daemons'' with one connection and fork the smtpsrvr to process it. The sun version calls the standard smtpsrvr program with channels set to ``smtp''.
The -d option enables debugging prints on the stderr output. The -f option (the finiky option) causes incoming connections from unknown hosts to be rejected. Smtpd notifies the smtpsrvr program to use the finicky option by calling it with argv[0] set to `rsmtpsrvr'. The maxconnects argument sets the maximum number of simultaneous connections to support. This value defaults to 4 on 4.2 systems.
The smtpsrvr argument is the path to the smtpsrvr program (relative or absolute). Generally this is something like /usr/mmdf/chans/smtpsrvr.
The channels argument is a comma-separated list of channels. When a connection is established, the source host is looked up in the host tables for these channels. If the source host is found, the corresponding channel name is given to submit as the channel it should consider the mail to have come from for authorization purposes. In the finicky mode, if the source host is not found, smtpsrvr will reject the incoming mail. In the normal (non-finicky) mode, if the source host is not found, smtpsrvr will assume the mail came in on the last channel in the channels list.
If your smtp channel table is a nameserver-type channel table and you are running in the finicky mode, then you should include the "local" channel in the list of acceptable channels. If you do not include "local" in this case, you will not be allowed to connect to your own server and submit mail because the nameserver channel will not let you look up your own address. (RFC 974 requires this to prevent mail loops).
Since the smtpsrvr program sets the trustme flag when calling submit, it must be called by a process whose UID is that of a trusted mail submitter (generally only root and mmdf).